package org.ling.xuan.dialog;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.Nullable;
import org.ling.xuan.config.DbConfig;
import org.ling.xuan.pannel.SelectTablePanel;

import javax.swing.*;

public class DataSqlDialog extends DialogWrapper {
    private final SelectTablePanel selectTablePanel;

    public DataSqlDialog(@Nullable Project project, boolean canBeParent) {
        super(project, canBeParent);
        setTitle("Data Sql");
        setSize(1600, 800);
        selectTablePanel = new SelectTablePanel(DbConfig.getJdbcTemplate());
        init();
    }

    @Override
    protected @Nullable JComponent createCenterPanel() {
        return selectTablePanel;
    }
}
